﻿#include "LoginSystem.h"
#include <QtWidgets/QApplication>
#include "Global_Class.h"
#include "Constants.h"
#include "AllData.h"
int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    LoginSystem window;
    loginWindow = &window; // 设置全局登录窗口指针
    window.initLoginSystem(); // 初始化登录系统
    loginWindow->show();
    int ret = app.exec();
    allData->Order_WriteToFile("littleTerm_Data/orders.txt");
    allData->SeatOccupy_WriteToFile("seat_occupy.txt");
    allData->Seat_WriteToFile("littleTerm_Data/seats.txt");
    allData->Station_WriteToFile("littleTerm_Data/stations.txt");
    allData->Train_Schedeles_WriteToFile("littleTerm_Data/train_schedule.txt");
    allData->Train_WriteToFile("littleTerm_Data/trains.txt");
    allData->User_WriteToFile("littleTerm_Data/users.txt");
    return ret;
}